<?php
/**
 * Created by PhpStorm.
 * User: qixiuxiu
 * Date: 2017/4/6
 * Time: 15:57
 */
namespace Calendar\Model;

class LeapYear{
    public function isleapyear($year = null){//经参数解析器后得到的是一个数组
        $yearstring = implode("",$year);//数组转字符串
        if (null === $yearstring){
            $yearstring = date('Y');
        }
        if ($yearstring % 400 == 0 || ($yearstring % 4 ==0 &&  $yearstring % 100 != 0)){
            return 1;
        }else{
            return 0;
        }
         
    }
}